109 research outputs found

    High-level Programming on Low-level Platforms: Two Domain-specific Languages based on Haskell

    Get PDF
    In this thesis, we describe our research on how to program low-level platforms with high-level languages.As an example, consider applications that run on microcontrollers. Such applicationsmay need to specify precise temporal behavior, carefully manage power usage, and handle cryptographic keys.Low-level platforms are programmed using low-level languages such as C/C++, where the lack of expressiveness canlead to error-prone code.We investigate whether we can use high-level languages to program these platforms, by embedding domain-specific languagesin a host language, Haskell. A high-level language offers better expressivity and shields the developer from low-leveldetails, yielding code that more concretely describes what the application is supposed to do. Furthermore, a richer runtimesystem could ease the burden of e.g. memory management and scheduling of coroutines.The papers in this thesis indicate that it is possible to program these devices using a high-level language. We developtwo domain-specific languages, Scoria and HasTEE. Scoria is evaluated on NRF52 microcontrollers, where we run applicationsthat require precise, temporal behavior and perform I/O. HasTEE is evaluated on machines whose processor has supportfor Intel Software Guard Extension and shows that the type system of Haskell can be used to automatically partition a Haskellapplication and run it in a trusted execution environment

    An Algebra of Sequential Decision Problems

    Get PDF

    HasTEE: Programming Trusted Execution Environments with Haskell

    Get PDF
    Trusted Execution Environments (TEEs) are hardware-enforced memory isolation units, emerging as a pivotal security solution for security-critical applications. TEEs, like Intel SGX and ARM TrustZone, allow the isolation of confidential code and data within an untrusted host environment, such as the cloud and IoT. Despite strong security guarantees, TEE adoption has been hindered by an awkward programming model. This model requires manual application partitioning and the use of error-prone, memory-unsafe, and potentially information-leaking low-level C/C++ libraries. We address the above with \textit{HasTEE}, a domain-specific language (DSL) embedded in Haskell for programming TEE applications. HasTEE includes a port of the GHC runtime for the Intel-SGX TEE. HasTEE uses Haskell's type system to automatically partition an application and to enforce \textit{Information Flow Control} on confidential data. The DSL, being embedded in Haskell, allows for the usage of higher-order functions, monads, and a restricted set of I/O operations to write any standard Haskell application. Contrary to previous work, HasTEE is lightweight, simple, and is provided as a \emph{simple security library}; thus avoiding any GHC modifications. We show the applicability of HasTEE by implementing case studies on federated learning, an encrypted password wallet, and a differentially-private data clean room.Comment: To appear in Haskell Symposium 202

    Effects of resistance training on the inflammatory response

    Get PDF
    Resistance training (RT) is associated with reduced risk of low grade inflammation related diseases, such as cardiovascular disease and type 2 diabetes. The majority of the data studying cytokines and exercise comes from endurance exercise. In contrast, evidence establishing a relationship between RT and inflammation is more limited. This review focuses on the cytokine responses both following an acute bout, and after chronic RT. In addition, the effect of RT on low grade systemic inflammation such as individuals at risk for type 2 diabetes is reviewed. Cytokines are secreted proteins that influence the survival, proliferation, and differentiation of immune cells and other organ systems. Cytokines function as intracellular signals and almost all cells in the body either secrete them or have cytokine receptors. Thus, understanding cytokine role in a specific physiological situation such as a bout of RT can be exceedingly complex. The overall effect of long term RT appears to ameliorate inflammation, but the specific effects on the inflammatory cytokine, tumor necrosis factor alpha are not clear, requiring further research. Furthermore, it is critical to differentiate between chronically and acute Interleukin-6 levels and its sources. The intensity of the RT and the characteristics of the training protocol may exert singular cytokine responses and as a result different adaptations to exercise. More research is needed in the area of RT in healthy populations, specifically sorting out gender and age RT acute responses. More importantly, studies are needed in obese individuals who are at high risk of developing low grade systemic inflammatory related diseases. Assuring adherence to the RT program is essential to get the benefits after overcoming the first acute RT responses. Hence RT could be an effective way to prevent, and delay low grade systemic inflammatory related diseases

    Antigenic Complementarity in the Origins of Autoimmunity: A General Theory Illustrated With a Case Study of Idiopathic Thrombocytopenia Purpura

    Get PDF
    We describe a novel, testable theory of autoimmunity, outline novel predictions made by the theory, and illustrate its application to unravelling the possible causes of idiopathic thrombocytopenia purpura (ITP). Pairs of stereochemically complementary antigens induce complementary immune responses (antibody or T-cell) that create loss of regulation and civil war within the immune system itself. Antibodies attack antibodies creating circulating immune complexes; T-cells attack T-cells creating perivascular cuffing. This immunological civil war abrogates the self-nonself distinction. If at least one of the complementary antigens mimics a self antigen, then this unregulated immune response will target host tissues as well. Data demonstrating that complementary antigens are found in some animal models of autoimmunity and may be present in various human diseases, especially ITP, are reviewed. Specific mechanisms for preventing autoimmunity or suppressing existing autoimmunity are derived from the theory, and critical tests proposed. Finally, we argue that Koch's postulates are inadequate for establishing disease causation for multiple-antigen diseases and discuss the possibility that current research has failed to elucidate the causes of human autoimmune diseases because we are using the wrong criteria

    Region-based Memory Management and Actor Model Concurrency An initial study of how the combination performs

    Get PDF
    Modern computer systems and the requirements we place upon them are vastly different from those of early systems. With the emergence of Internet of Things (IoT) devices, the number of devices with hard, real-time deadlines have increased greatly. The presence of a garbage collector does not resonate well with such systems, as garbage collectors typically use a stop-the-world approach. The problem is amplified further in languages such as Erlang, where it is commonplace to spawn many processes. In Erlang, each process has its own heap which is individually garbage collected. A common design of an IoT device is a board with several different sensors and peripherals. The presence of so many garbage collectors should be enough to deter us from using Erlang to program IoT devices, but the idea of writing small, isolated programs to manage each of the sensors is appealing. Another memory management principle, one which could eliminate the need for a garbage collector, is called Region-based Memory Management. This thesis has investigated how well current Region-based Memory Management techniques work when they are applied to a setting that implements Actor Model concurrency. To investigate this an Actor Model concurrency-library has been implemented in Standard ML and compiled with the MLKit compiler - a compiler which uses Region-Based memory management. Evaluating the speed and memory performance of the library shows that the combination performs poorly. The Region-inference algorithm employed by the compiler struggles with identifying when data can be deallocated and retains most data throughout the execution of a program. We identify some key problems and propose how they could be solved. We conclude that current techniques are not well suited in a setting with Actor Model concurrency. We cannot, however, say if the combination of Region-based memory management and the Actor concurrency model works well or not, as further research is required

    Evaluering och utveckling av bildbaserade positioneringssystemför självkörande skalade fordon

    Get PDF
    Den här rapporten evaluerar olika strategier för autonom positionsbestämning av skalade självkörande fordon. Rapporten presenterar två olika positioneringssystem som med hjälp av en Raspberry Pi och tillhörande kameramodul rapporterar en position för ett fordon i ett ansatt referenssystem; ett referenssystem som kan delas av flera fordon. Även ett system för lokal positionsbestämning baserat på vägkantsidentifiering presenteras. Positioneringssystemen har evaluerats i en trafiksituation som innefattar raksträckor, svängar och en rondell. Resultaten visar att systemen är tillräckligt robusta för att användas i en kontrollerad laborationsmiljö. Systemen i dess nuvarande utförande anses dock inte tillräckligt robusta för att användas i en miljö där andra fordon befinner sig. De positioneringssystem som presenteras i rapporten utnyttjar endast on-board sensorer och ingen trådlös kommunikation med omgivningen förekommer. Detta möjliggör en mycket flexibel evaluering av systemen och nya testbanor kan enkelt introduceras. En central teknik för samtliga system är bildbehandling. Centrala bildbehandlingsmetoder som evalueras i rapporten är objekt- och kantidentifiering samt optiskt flöde. Dessa metoder implementeras i de positioneringssystem som rapporten presenterar. Författarna anser att de utvecklade systemens resultat verifierar att det är fullt möjligt att utveckla positioneringssystem för självkörande skalade fordon till en låg kostnad

    Higher-Order Concurrency for Microcontrollers

    No full text
    Programming microcontrollers involves low-level interfacing with hardware and peripherals that are concurrent and reactive. Such programs are typically written in a mixture of C and assembly using concurrent language extensions (like FreeRTOS tasks and semaphores), resulting in unsafe, callback-driven, error-prone and difficult-to-maintain code.We address this challenge by introducing SenseVM - a bytecode-interpreted virtual machine that provides a message-passing based higher-order concurrency model, originally introduced by Reppy, for microcontroller programming. This model treats synchronous operations as first-class values (called Events) akin to the treatment of first-class functions in functional languages. This primarily allows the programmer to compose and tailor their own concurrency abstractions and additionally, abstracts away unsafe memory operations, common in shared-memory concurrency models, thereby making microcontroller programs safer, composable and easier-to-maintain.Our VM is made portable via a low-level bridge interface, built atop the embedded OS - Zephyr. The bridge is implemented by all drivers and designed such that programming in response to a software message or a hardware interrupt remains uniform and indistinguishable. In this paper we demonstrate the features of our VM through an example, written in a Caml-like functional language, running on the nRF52840 and STM32F4 microcontrollers
    corecore